{include file="public/layout" /}
<body class="bodystyle" style="overflow-y: scroll;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page atta min-hg-c-10">
    {include file="system/bar" /}
    <form method="post" enctype="multipart/form-data" name="form1" id="handlepost" action="{:url('System/basic')}">
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label for="basic_indexname">面包屑首页名</label>
                </dt>
                <dd class="opt">
                    <input id="basic_indexname" name="basic_indexname" value="{$config.basic_indexname|default='首页'}" class="input-txt" type="text" />
                    <p class="notic"></p>
                </dd>
            </dl>
            {eq name='$main_lang' value='$admin_lang'}
            <dl class="row">
                <dt class="tit">
                    <label for="list_symbol">面包屑间隔符</label>
                </dt>
                <dd class="opt">
                    <input id="list_symbol" name="list_symbol" value="{$config.list_symbol|default=' > '}" class="input-txt" type="text" />
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="image_type">上传图片格式</label>
                </dt>
                <dd class="opt">
                    <textarea rows="5" cols="60" id="image_type" name="image_type" style="height:20px;">{empty name='config.image_type'}jpg|gif|png|bmp|jpeg|ico{else /}{$config.image_type}{/empty}</textarea>
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="file_type">上传软件格式</label>
                </dt>
                <dd class="opt">
                    <textarea rows="5" cols="60" id="file_type" name="file_type" style="height:20px;">{empty name='config.file_type'}zip|gz|rar|iso|doc|xsl|ppt|wps{else /}{$config.file_type}{/empty}</textarea>
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="media_type">视频格式</label>
                </dt>
                <dd class="opt">
                    <textarea rows="5" cols="60" id="media_type" name="media_type" style="height:20px;">{empty name='config.media_type'}swf|mpg|mp3|rm|rmvb|wmv|wma|wav|mid|mov|mp4{else /}{$config.media_type}{/empty}</textarea>
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="file_size">附件上传大小</label>
                </dt>
                <dd class="opt">
                    <input id="file_size" name="file_size" value="{$config.file_size|default=$max_filesize}" type="text" style="width: 60px;" /> {$max_sizeunit}
                    <p class="notic">附件上传大小限制，如果空间不支持，请与空间商联系修改php.ini部分参数</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>内容图片附加功能</label>
                </dt>
                <dd class="opt">
                    <label><input type="checkbox" name="basic_img_auto_wh" value="1" {if condition="!isset($config.basic_img_auto_wh) OR $config.basic_img_auto_wh eq 1"}checked="checked"{/if} title="自动通过样式控制，确保手机端下图片不拉伸变形">wap端自适应</label>&nbsp;&nbsp;
                    <label><input type="checkbox" name="basic_img_title" value="1" {if condition="!isset($config.basic_img_title) OR $config.basic_img_title eq 1"}checked="checked"{/if}>追加title属性</label>&nbsp;&nbsp;
                    <label><input type="checkbox" name="basic_img_alt" value="1" {if condition="!isset($config.basic_img_alt) OR $config.basic_img_alt eq 1"}checked="checked"{/if} onclick="check_basic_img_alt(this);">追加alt属性</label>&nbsp;&nbsp;
                    <label id="basic_img_alt_force" {if condition="isset($config.basic_img_alt) && $config.basic_img_alt != 1"} class="none" {/if}><input type="checkbox" name="basic_img_alt_force" value="1" {if condition="!empty($config.basic_img_alt_force)"} checked="checked" {/if}>alt强制同步title</label>&nbsp;&nbsp;
                    <span class="err"></span>
                    <p class="notic">针对文档详情页的内容图片附加这些功能效果</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="other_arcclick">文档默认点击数</label>
                </dt>
                <dd class="opt">
                    <input id="other_arcclick" name="other_arcclick" value="{if isset($other_config.other_arcclick) && 0 <= $other_config.other_arcclick}{$other_config.other_arcclick}{else /}500|1000{/if}" onkeyup="this.value=this.value.replace(/[^\|\d]/g,'');" onpaste="this.value=this.value.replace(/[^\|\d]/g,'')" class="input-txt" type="text" />
                    <p class="notic">比如：500|1000 表示随机数500-1000之间</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="other_arcdownload">文件默认下载数</label>
                </dt>
                <dd class="opt">
                    <input id="other_arcdownload" name="other_arcdownload" value="{if isset($other_config.other_arcdownload) && 0 <= $other_config.other_arcdownload}{$other_config.other_arcdownload}{else /}100|500{/if}" onkeyup="this.value=this.value.replace(/[^\|\d]/g,'');" onpaste="this.value=this.value.replace(/[^\|\d]/g,'')" class="input-txt" type="text" />
                    <p class="notic">比如：100|500 表示随机数100-500之间</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="editor_select">内容编辑器</label>
                </dt>
                <dd class="opt">
                    <label class="curpoin"><input type="radio" name="editor_select" value="1" {if condition="empty($editor.editor_select) || $editor.editor_select eq 1"} checked="checked" {/if}>Ueditor</label>
                    &nbsp;&nbsp;
                    <label class="curpoin"><input type="radio" name="editor_select" value="2" {if condition="isset($editor.editor_select) && $editor.editor_select eq 2"} checked="checked" {/if}>Ckeditor</label>
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row {if condition="!empty($editor.editor_select) && $editor.editor_select != 1"} none {/if}" id="bdmap_ak_dl">
                <dt class="tit">
                    <label for="editor_select">百度地图AK</label>
                </dt>
                <dd class="opt">
                    <input name="editor_bdmap_ak" value="{$editor.editor_bdmap_ak}" class="input-txt" type="text" />
                    <p class="notic">影响功能：百度编辑器工具栏里的Baidu地图</p>
                    &nbsp;&nbsp;<a href="JavaScript:void(0);" data-href="https://www.eyoucms.com/plus/view.php?aid=30297&origin_eycms=1" onclick="openFullframe(this,'获取百度地图的访问应用AK');" style="font-size: 12px;">获取AK？</a>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>编辑器常用配置</label>
                </dt>
                <dd class="opt">
                    <label><input type="checkbox" name="editor_remote_img_local" value="1" {if condition="!isset($editor.editor_remote_img_local) OR $editor.editor_remote_img_local eq 1"}checked="checked"{/if} title="开启后,提交保存文档时将先自动执行远程图片本地化操作">远程图片本地化</label>&nbsp;&nbsp;
                    <label><input type="checkbox" name="editor_img_clear_link" value="1" {if condition="!isset($editor.editor_img_clear_link) OR $editor.editor_img_clear_link eq 1"}checked="checked"{/if}  title="开启后,提交保存文档时将先自动执行清除非本站链接操作">清除非本站链接</label>&nbsp;&nbsp;
                    <span class="err"></span>
                    <p class="notic">开启远程图片本地化后,提交保存文档时将先自动执行远程图片本地化操作；开启清除非本站链接后,提交保存文档时将先自动执行清除非本站链接操作</p>
                </dd>
            </dl>
            <dl class="row {if condition="empty($editor.editor_img_clear_link)"}none{/if}" id="dl_basic_body_allowurls">
                <dt class="tit">
                    <label for="basic_body_allowurls">外链域名白名单</label>
                </dt>
                <dd class="opt">
                    <textarea rows="5" cols="60" id="basic_body_allowurls" name="basic_body_allowurls" style="height:100px;" placeholder="一行表示一个域名，比如：
baidu.com
aliyun.com
video.qq.com
                    ">{$config.basic_body_allowurls|default=''}</textarea>
                    <p class="notic"></p>
                </dd>
            </dl>
            {/eq}
            <div class="bot">
                <input type="hidden" name="max_filesize" id="max_filesize" value="{$max_filesize}">
                <input type="hidden" name="max_sizeunit" id="max_sizeunit" value="{$max_sizeunit}">
                <input type="hidden" name="old_basic_img_setlist" value="{$config.basic_img_auto_wh|default=0}{$config.basic_img_alt|default=0}{$config.basic_img_title|default=0}">
                <a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="adsubmit();">确认提交</a>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript">
    $('input[name=editor_select]').click(function(){
        if (1 == $(this).val()) {
            $('#bdmap_ak_dl').show();
        }else{
            $('#bdmap_ak_dl').hide();
        }
    });

    $('input[name=editor_img_clear_link]').click(function(){
        if (1 == $(this).is(':checked')) {
            $('#dl_basic_body_allowurls').show();
        }else{
            $('#dl_basic_body_allowurls').hide();
        }
    });

    function check_basic_img_alt(obj)
    {
        if ($(obj).is(":checked")) {
            $('#basic_img_alt_force').show();
        } else {
            $('#basic_img_alt_force').hide();
        }
    }
    function adsubmit(){
        var file_size = parseInt($('#file_size').val());
        var max_filesize = parseInt($('#max_filesize').val());
        var max_sizeunit = $('#max_sizeunit').val();
        if (0 < max_filesize && max_filesize < file_size) {
            showErrorMsg('附件上传大小超过空间的最大限制'+max_filesize+max_sizeunit);
            $('input[name=file_size]').focus();
            return false;
        }

        layer_loading("正在处理");
        $('#handlepost').submit();
    }
</script>

{include file="public/footer" /}